package com.example.demo.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * 广宣录入2表
 * @author 吕佳辉
 *
 */
@Entity
public class Advertising2 {
	
	private Integer id;
	private String touFangMethod;//投放方式
	private String touFangArea;//投放区域
	private String touFangDept;//投放部门
	private Integer touFangMoney;//投放金额
	private Date beginDate;//开始修改日期
	private Date endDate;//结束修改日期
	private Advertising adver;//绑定1表
	
	
	
	public String getTouFangMethod() {
		return touFangMethod;
	}
	public void setTouFangMethod(String touFangMethod) {
		this.touFangMethod = touFangMethod;
	}
	public String getTouFangArea() {
		return touFangArea;
	}
	public void setTouFangArea(String touFangArea) {
		this.touFangArea = touFangArea;
	}

	
	public String getTouFangDept() {
		return touFangDept;
	}
	public void setTouFangDept(String touFangDept) {
		this.touFangDept = touFangDept;
	}
	public Integer getTouFangMoney() {
		return touFangMoney;
	}
	public void setTouFangMoney(Integer touFangMoney) {
		this.touFangMoney = touFangMoney;
	}
	
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@ManyToOne
	public Advertising getAdver() {
		return adver;
	}
	public void setAdver(Advertising adver) {
		this.adver = adver;
	}
	
	
}
